import request from "@/utils/request";
//获取分类
export async function getCategory(params){
  return request('/admin/category?type=all',{params})
}
//获取分类详情
export async function showCategory(editId){
  return request(`/admin/category/${editId}`)
}
//是否禁用分类
export async function lockCategory(editId){
  return request.patch(`/admin/category/${editId}/status`)
}
//添加分类
export async function addCategory(data){
  return request.post('/admin/category',{data})
}
//更新分类
export async function updateCategory(editId,data){
  return request.put(`/admin/category/${editId}`,{data})
}